#include "Enesim.h"
#include "Emage.h"

int main(void)
{
	Enesim_Renderer *r;
	Enesim_Surface *s;

	enesim_init();
	enesim_image_init();

	s = enesim_surface_new(ENESIM_FORMAT_ARGB8888, 256, 256);

	r = enesim_renderer_checker_new();
	enesim_renderer_checker_even_color_set(r, 0xffffffff);
	enesim_renderer_checker_odd_color_set(r, 0xffcccccc);
	enesim_renderer_checker_width_set(r, 10);
	enesim_renderer_checker_height_set(r, 10);
	enesim_renderer_draw(r, s, NULL, 0, 0, NULL);

	r = enesim_renderer_rectangle_new();
	enesim_renderer_origin_set(r, 15.0, 15.0);
	enesim_renderer_rop_set(r, ENESIM_BLEND);
	enesim_renderer_rectangle_width_set(r, 128);
	enesim_renderer_rectangle_height_set(r, 128);
	enesim_renderer_rectangle_corner_radius_set(r, 15);
	enesim_renderer_rectangle_corners_set(r, EINA_TRUE, EINA_FALSE, EINA_FALSE, EINA_TRUE);
	enesim_renderer_shape_fill_color_set(r, 0xff00ffff);
	enesim_renderer_shape_stroke_color_set(r, 0Xffff0000);
	enesim_renderer_shape_stroke_weight_set(r, 3.0);
	enesim_renderer_shape_draw_mode_set(r, ENESIM_SHAPE_DRAW_MODE_STROKE_FILL);

	enesim_renderer_draw(r, s, NULL, 0, 0, NULL);

	enesim_image_file_save("enesim_tutorial01.png", s, NULL);

	enesim_image_shutdown();
	enesim_shutdown();

	return 0;
}
